import 'babel-polyfill';
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, IndexRoute, Link } from '$router';
//import HomePage from './home';
//<IndexRoute component={HomePage}/>
import yoHistory from '../common/history';

const Home = require.async('./home');
const My = require.async('./my');
const Skills = require.async('./skills');
const Project = require.async('./project');

const Detail = require.async('./detail');

const Root = () => (
    <Router history={yoHistory}>
        <Route path="/">
            
            <IndexRoute  getComponent={Home} />
            <Route path="my" getComponent={My} />
            <Route path="skills" getComponent={Skills} />
            <Route path="project" getComponent={Project} />
            <Route path="detail" getComponent={Detail}/>
        </Route>
    </Router>
);

ReactDOM.render(<Root />, document.getElementById('root'));
